//
//  addDiaryHeadView.m
//  Estate
//
//  Created by heyong on 16/6/24.
//  Copyright © 2016年 ttsx. All rights reserved.
//

#import "addDiaryHeadView.h"

@implementation addDiaryHeadView
- (UILabel *)title{
    if(_title==nil){
        _title=[[UILabel alloc]init];
    }
    return _title;
}


- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self addSubview:self.title];
        self.backgroundColor = [UIColor whiteColor];
        UIImageView *image = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, DEF_WIDTH(self), 8)];
        [self addSubview:image];
        image.backgroundColor = [UIColor colorWithRed:0.97 green:0.97 blue:0.97 alpha:1.00];
        image.image = [UIImage imageNamed:@"juchixia"];
        
        self.title.frame = CGRectMake(8, 10, DEF_WIDTH(self)-5,20);
        self.title.font = [UIFont systemFontOfSize:15.];
        self.title.textColor = [UIColor colorWithRed:0.47 green:0.48 blue:0.49 alpha:1.00];
    }
    return self;
}

@end
